for i in range(1,5):
    for j in range(i):
        print(j,end=' ')
    print("\n",end='')

